<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="Layuimini/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="Layuimini/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="Layuimini/css/public.css" media="all">

    <style>

        .icon {
            margin-right: 10px;
            color: #00FA9A !important;
        }

        .icon-blue {
            margin-right: 10px;
            color: #1e9fff !important;
        }

        .icon-tip {
            margin-right: 10px;
            color: #8A2BE2 !important;
        }


    </style>

</head>
<body>

<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row layui-col-space12">
            <form class="layui-form" action="">

                <div class="layui-inline">
                    <!-- <label class="layui-form-label">关键字</label>-->
                    <div class="layui-input-inline">
                        <input type="text" name="condition" id="condition" lay-verify="date" placeholder="请输入关键字" autocomplete="off" class="layui-input">
                    </div>

                </div>

                <button type="button" class="layui-btn layui-btn-primary" id="searchBtn"
                        lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索
                </button>

                <button type="button" class="layui-btn layui-btn-primary" id="resetBtn">
                    <i class="fa fa-refresh"></i> 重 置
                </button>


                <button type="button" class="layui-btn" id="newBtn">
                    <i class="fa fa-plus-square"></i>&ensp;新增网址</button>

               <!-- <button type="button" class="layui-btn layui-btn-danger" id="delBtn">
                    <i class="fa fa-close"></i>&ensp;删除网址</button>-->

                <a type="button" class="layui-btn layui-btn-normal" id="manageBtn" >
                    <i class="fa fa fa-cogs"></i>&ensp;网址设置</a>



            </form>
            <div class="layui-col-md12">
                <div class="layui-row layui-col-space12">
                    <div class="layui-col-md16">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-diamond layui-bg-green"></i>常用网址</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space12 layuimini-qiuck">
                                        <th th:each="commonList,stat:${common}">
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a th:href="${commonList.superUrl}" layuimini-content-href="javascript:;"
                                                   th:title="${commonList.superDesc}" target="_blank">
                                                    <i th:class="${commonList.superIcon}"></i>
                                                    <cite th:text="${commonList.superName}"></cite>
                                                </a>
                                            </div>
                                        </th>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-database layui-bg-blue"></i>工具网址</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space12 layuimini-qiuck">
                                        <th th:each="utilsList,stat:${utils}">
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a th:href="${utilsList.superUrl}" layuimini-content-href="javascript:;"
                                                   th:title="${utilsList.superDesc}" target="_blank">
                                                    <i th:class="${utilsList.superIcon}"></i>
                                                    <cite th:text="${utilsList.superName}"></cite>
                                                </a>
                                            </div>
                                        </th>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-sign-out layui-bg-orange"></i>其他网址</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space12 layuimini-qiuck">
                                        <th th:each="otherList,stat:${other}">
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a th:href="${otherList.superUrl}" layuimini-content-href="javascript:;"
                                                   th:title="${otherList.superDesc}" target="_blank">
                                                    <i th:class="${otherList.superIcon}"></i>
                                                    <cite th:text="${otherList.superName}"></cite>
                                                </a>
                                            </div>
                                        </th>
                                    </div>
                                </div>
                            </div>
                        </div>


                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<script src="jQuery/jquery-2.1.1.min.js" th:src="@{LightYear/js/jquery.min.js}" charset="utf-8"></script>
<script src="Layuimini/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="Layuimini/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
</body>
<script>

    $("#searchBtn").click(function(){

        var condition =    $("#condition").val();
        if(condition==""){
           // layer.tips("查询条件不能为空！","#searchParam",{tips:3});
            layer.msg("查询条件不能为空！")
        }else{
            window.location.href="toURLPage?condition="+condition;
        }
    });

    $("#resetBtn").click(function(){
        window.location.href="toURLPage";
    })


$("#newBtn").click(function () {
    layer.open({
        title: '添加网址',
        type: 2,
        shade: 0.2,
        maxmin: true,
        shadeClose: true,
        area: ['100%', '100%'], //宽高
        content: 'toAddURLPage'
    });
})


    $("#manageBtn").click(function () {
       /* layer.open({
            title: '网址设置界面',
            type: 2,
            shade: 0.2,
            maxmin: true,
            shadeClose: true,
            area: ['100%', '100%'], //宽高
            content: 'toManageUrlPage'
        });*/

            window.parent.layui.element.tabAdd('layuiminiTab',
                {
                    id:"toManageUrlPage",
                    href: "toManageUrlPage",
                    title: "网址编辑设置",
                    content: '<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" src="toManageUrlPage"></iframe>'
                }
            );
            window.parent.layui.element.tabChange('layuiminiTab', 'toManageUrlPage');
            //跳转的同时关闭弹窗，便于返回页面后请求接口
            layer.close(layer.index);
           // layer.msg("网址编辑设置已打开，请前去设置!");

    })


/*    $("#delBtn").click(function () {
        layer.open({
            title: '删除网址',
            type: 2,
            shade: 0.2,
            maxmin: true,
            shadeClose: true,
            area: ['40%', '40%'], //宽高
            content: 'todelURLPage'
        });
    })*/


</script>
</html>